package com.atguigu.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : leimingchao
 * @date Date : 2021年11月06日 22:04
 */
@RestController
public class ConfigClientRest {

    @Value(value = "${spring.application.name}")
    private String applicationName;

    @Value(value = "${eureka.client.service-url.defaultZone}")
    private String eurekaServers;

    @Value(value = "${server.port}")
    private String port;

    @GetMapping(value = "/config")
    public String getConfig() {
        String str = "applicaitonName:" + applicationName + "\t eurekaServers:" + eurekaServers + "\t port:" + port;
        System.out.println("*******str:" + str);
        return "applicationName:" + applicationName + "\t eurekaServers:" + eurekaServers + "\t port:" + port;
    }
}
